public class test1 {
    public static void main(String[] args) {
        //数字加密
        //每位数加上5
        //在对10取余
        //最后翻转

        //1 将整数放进去数组
        int[] arr = {1, 9, 8, 3};
        //2 加密
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] + 5;
        }

        //取模
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] % 10;
        }
        //3 翻转
        for (int i = 0, j = arr.length - 1; i < j; i++, j--) {
            int tmp = arr[i];
            arr[i] = arr[j];
            arr[j] = tmp;
        }

        //输出
//        for (int i = 0; i < arr.length; i++) {
//            System.out.print(arr[i] + " ");
//        }//8 3 4 6

        //把数组里面的数字进行一个拼接
        int number = 0;
        for (int i = 0; i < arr.length; i++) {
            number = number * 10 + arr[i];
        }
        System.out.println(number);
    }
}
